1. Field of the Invention
The present invention relates to an in-circuit emulator, and more specifically to an in-circuit emulator for use in a microprocessor including a cache memory therein.
2. Description of Related Art
An in-circuit emulator simulating an operation of a microprocessor has a function called a "break function" for discontinuing the execution at an arbitrary position of a program. The break function has been realized by comparing an address or another signal outputted from the microprocessor with a value previously set in a register provided externally to the microprocessor, and by interrupting the microprocessor so as to request discontinuation of the execution when the result of comparison is indicative of coincidence.
In addition, some conventional microprocessors include therein a cache memory, which is located between the microprocessor and an external memory and which has an accesses speed remarkably higher than that of the external memory. When the microprocessor access the external memory, data on an address of the external memory accessed by the microprocessor is copied to the cache memory, so that at a next access by the microprocessor, if the data required by the microprocessor exists in the cache memory, the microprocessor accesses to the cache memory, but does not access to the external memory. Therefore, performance is elevated by the difference in the access speed between the external memory and the cache memory. Accordingly, the cache memory is provided in the microprocessor with expectation of a great increase of performance.
In the case that a 32-bit microprocessor having an address of 32 bits and a data of 32 bits and including the cache memory therein is used in the in-circuit emulator, assume that an address "11001209.sub.H " (suffix "H" indicates a hexadecimal notation) is set as a break address, and also assume that one block, which is a minimum unit of data stored in the cache memory, is 16 bytes. In this situation, when the microprocessor accesses an address "11001200.sub.H ", if data of the address "11001200.sub.H " is not registered in the cache memory, the microprocessor accesses the external memory. Therefore, one block of data is block-transferred from the external memory to the cache memory in four continuous cycles. In this process, one word of data accessed in a first cycle is not only stored in the cache memory but also used internally in the microprocessor. However, words of data accessed in the remaining three cycles are only stored in the cache memory.
In this situation, the conventional in-circuit emulator has been disadvantageous in which, an interrupt request which should have been generated at an address "11001209.sub.H " in a third cycle of the four continuous cycles is not generated, and therefore, the execution of the microprocessor is not interrupted. In addition, thereafter, even if the access to the address "11001209.sub.H " is generated, the microprocessor accesses to the cache memory, and therefore, the address "11001209.sub.H " is not outputted from the microprocessor. Accordingly, the microprocessor is not interrupted.
As seen from the above, when the access of the microprocessor hits on the cache memory, namely, when the data to be accessed is registered in the cache memory internally provided in the microprocessor, no external access is performed. Namely, no address signal is outputted externally from the microprocessor. Therefore, a break address cannot be detected external of the microprocessor. Because of this, it has been a conventional practice to invalidate all of the cache memory so that access is made to an external device without exception, and therefore, the break address can be detected externally. In this case, however, since no access to the cache memory is performed, the execution time becomes considerably or remarkably long in comparison with the case in which the cache memory is effectively utilized. In other words, a real time operation is lost.